package core;

import java.util.HashMap;

import weka.core.Instance;

public class Sentence {

	public String frase;
	public String categoriaReal;
	public String categoriaTemp;
	public String featureVector;
	public Instance instanceWeka;
	public HashMap<String, Pair<String, Double>> etiquetasClassificadores;
	
	public Sentence(String _sentence){
		categoriaReal = descobreTipoFrase(_sentence);
		frase = _sentence.replaceAll("<([0-9]+?)>", "");
		frase = frase.replaceAll("</([0-9]+?)>", "");
		featureVector = new String();
		etiquetasClassificadores = new HashMap<String, Pair<String, Double>>();
	}
	
	public static String descobreTipoFrase(String sentence){
		int inicioTagFecho = sentence.indexOf("</");
		String tag = sentence.substring(inicioTagFecho+2);
		int fimTagFecho = tag.indexOf(">");
		return tag.substring(0, fimTagFecho);
	}
	
	
}
